import { NavLink, useNavigate } from "react-router"

const NotFound = () => {
  const navigate = useNavigate();
  return (
    <>
      <div>NotFound</div>
      <span onClick={() => navigate('/home')}>返回主页</span>
      <button onClick={() => {
        navigate('/home');
      }}>跳转</button>

      <button onClick={() => {
        navigate('/home', { replace: true });
      }}>跳转后不可回退</button>

      <button onClick={() => {
        navigate(-1);
      }}>返回</button>
      <NavLink to="/home"> 去首页</NavLink>
    </>
  )
}

export default NotFound